Skip to content

docs: fill small gaps in http-api, cli, and operations-and-policy#18

Closed
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/codebase-documentation-alignment-0b6f
Closed

docs: fill small gaps in http-api, cli, and operations-and-policy#18
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/codebase-documentation-alignment-0b6f

Conversation

@cursor

@cursor cursor Bot commented May 2, 2026

Copy link
Copy Markdown

Targeted documentation fixes and additions covering knowledge gaps found by auditing the source code against the existing docs. All changes are verified against the implementation — no fabricated behavior.

Docs updated

docs/http-api.md

  • New Web UI section — documents GET / serving the React UI from static/index.html and /assets/* static files; this route was missing entirely.
  • run_id uniqueness scope — clarifies uniqueness is per-database (not "per workspace" as previously stated, which incorrectly implied workspace_id partitions the key).
  • Empty events array — documents HTTP 422 response when "events": [] is sent (Pydantic min_length=1 constraint, previously undocumented).
  • window format constraints — adds that N must be a positive integer; zero/negative/unsupported units return HTTP 400.

docs/cli.md

  • Actor resolution — documents how the actor field written to the audit ledger is resolved: $USER (Unix) → $USERNAME (Windows) → "unknown". Clarifies that --actor is HTTP/SDK-only; the CLI resolves it automatically.

docs/operations-and-policy.md

  • window format constraints — expands the compute_diff steps to enumerate valid units and note OperationError on bad input.
  • New error rowPromoted baseline release is missing: rel_... in the Common errors table, covering the case where a promoted_releases pointer references a release row that no longer exists (manual DB edit or truncation). Includes cause and fix guidance.

Codepaths covered

  • src/flightdeck/server/app.py (GET /, /assets/*, GET /health)
  • src/flightdeck/server/routes/ingest.py (POST /v1/events, min_length=1 on request body)
  • src/flightdeck/storage.py (run_id PRIMARY KEY, insert_run_events dedup)
  • src/flightdeck/ledger.py (parse_window — positive int constraint, d/h/m units)
  • src/flightdeck/operations.py (_evaluate_promotion_or_rollback — promoted baseline missing error)
  • src/flightdeck/cli/main.py (actor_name() resolution logic)

Verification

  • uv run python -m ruff check src tests — all checks passed
  • uv run python -m pytest — 75 passed
  • uv run flightdeck-quickstart-verify — OK
Open in Web View Automation 

- http-api.md: add Web UI section (GET / serves React UI from static/)
- http-api.md: clarify run_id uniqueness scope is per-database, not
  per workspace_id
- http-api.md: document HTTP 422 on empty events array (Pydantic
  min_length=1 constraint)
- http-api.md: expand window format note with positive-integer constraint
  and invalid-value error behavior
- cli.md: document actor resolution ( /  / 'unknown');
  note that --actor is HTTP/SDK-only
- operations-and-policy.md: add window format constraints to compute_diff
  steps (valid units, positive N, OperationError on bad input)
- operations-and-policy.md: add 'Promoted baseline release is missing'
  to Common errors table with cause and fix guidance

Co-authored-by: Gottam Sai Bharath <Gsbreddy@users.noreply.github.com>
@Gsbreddy Gsbreddy closed this May 2, 2026
@Gsbreddy Gsbreddy deleted the cursor/codebase-documentation-alignment-0b6f branch May 2, 2026 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants